//
// Created by nilyang on 2022/9/25.
//

#ifndef BASIC_META_PROGRAMS_H
#define BASIC_META_PROGRAMS_H

namespace nilyang {

    /// C++11 changes the playing field
    template<class... T>
    struct type_list {
    };

    /// C++03
    template<class T>
    struct add_pointer_cxx03 {
        typedef T *type;
    };

    /// C++03 usage
    template<class X>
    class class_add_pointer_cxx03 {
        typedef typename add_pointer_cxx03<X>::type Xp;
    };

    /// C++11 style
    template<class T> using add_pointer_cxx11 = T *;

    /// Usage
    template<class T>
    class class_add_pointer_cxx11 {
        typedef add_pointer_cxx11<T> Xp;
        using XpType = add_pointer_cxx11<T>;

    };

    class meta_programs {

    };


}


#endif //BASIC_META_PROGRAMS_H
